/*
 * {comment of class}
 *
 * @author (C) <a href="http://www.carfield.com.hk">Carfield Yim</a>, 2005
 */
package hk.com.carfield.util;

public final class TimeUtil {
	public static long SEC = 1000;
	public static long MIN = 60*SEC;
	public static long DAY = 24*60*MIN;
	public static long WEEK = 7*DAY;
	
	private static long presetCurrentTime = Long.MAX_VALUE;
	public static long currentTime() {
		return (presetCurrentTime == Long.MAX_VALUE) ? System.currentTimeMillis() : presetCurrentTime;
	}
	public static void setCurrentTime(long presetCurrentTime) {
		TimeUtil.presetCurrentTime = presetCurrentTime;
	}
	public static void resetCurrentTime() {
		presetCurrentTime = Long.MAX_VALUE;		
	}
}
